<div style="width:525px; margin-left:30px; background-color:#fff;">
  <div id="pages" style="padding:15px 20px 20px;">
  <form action="<?php e($this->base); ?>/galleries/update/<?php e($view); ?>" method="post">
<p><div class="fLeft"><?php
echo $paginator->counter(array(
    'format' => __('Showing %start% - %end% of %count% gallery ', true)
));
?></div><div class="fRight">
<?php if ($view == 'A') { ?>
  <a href="<?php e($this->base); ?>/galleries/manage">Pending</a> | <b>Approved</b>
<?php } else { ?>
  <b>Pending</b> | <a href="<?php e($this->base); ?>/galleries/manage/A">Approved</a>
<?php } ?></div>
<div class="clear"></div></p>
  <div style="width:550px; height:540px; overflow:auto; margin-top:5px;">
    <table width="525" cellpadding="3" cellspacing="0" border="0">
<?php
$i = 0;
foreach ($data as $g):
    $class = null;
    if ($i++ % 2 == 0) { $class = ' class="altrow"'; } ?>
      <tr>
        <td valign="top">
          <a href="<?php e($this->base); ?>/img/gallery/<?php e($g['Gallery']['filename']); ?>" rel="sexylightbox"><img src="<?php e($this->base); ?>/img/gallery/s_<?php e($g['Gallery']['filename']); ?>" border="0" /></a>
        </td>
        <td valign="top">
          <div><span style="color:#000;">Title:</span> <?php e($g['Gallery']['title']); ?></div>
          <div><span style="color:#000;">Description:</span> <?php e(nl2br($g['Gallery']['description'])); ?></div>
          <div><span style="color:#000;">Author:</span> <?php e($g['Gallery']['author']); ?></div>
          <div><span style="color:#000;">Email:</span> <?php e($g['Gallery']['email']); ?></div>
          <div><span style="color:#000;">Contact:</span> <?php e($g['Gallery']['contact']); ?></div>
          <div><span style="color:#000;">Created:</span> <?php e($time->nice($g['Gallery']['created'])); ?></div>
<?php if ($view == 'A') { ?>
          <div><span style="color:#000;">Sort Order:</span> <input type="text" name="odr_<?php e($g['Gallery']['id']); ?>" value="<?php e($g['Gallery']['order']); ?>" style="width:30px;" /></div>
<?php } ?>
        </td>
        <td>
          <input type="checkbox" name="ids[]" value="<?php e($g['Gallery']['id']); ?>" />
        </td>
      </tr>
<?php endforeach; ?>
    </table>
  </div>
  <div class="paging" style="margin-top:5px;">
    <?php __('Page:'); $paginator->options(array('url' => $this->passedArgs)); ?>
    <?php echo $paginator->prev('<< '.__('previous', true), array(), null, array('class'=>'disabled')); ?>
    <?php echo $paginator->numbers(); ?>
    <?php echo $paginator->next(__('next', true).' >>', array(), null, array('class'=>'disabled')); ?>
    <div class="fRight">
      <input type="submit" name="delete" value="Delete" />
<?php if ($view == 'A') { ?>
      <input type="submit" name="update" value="Update" />
<?php } else { ?>
      <input type="submit" name="approve" value="Approve" />
<?php } ?>
    </div>
  </div>
  <div class="clear"></div>
  </form>
  </div>
</div>

<script type="text/javascript">
var _webroot = '<?php e($this->base); ?>';

function init () {
    SexyLightbox.initialize({
        color: 'white',
        dir: _webroot+'/css/sexylightbox/',
        OverlayStyles : {
            'background-color': '#000',
            'opacity': 0.5
        }
    });
} // init
<?php $this->addScript('Ext.onReady(function() { init(); });'); ?>
</script>